package com.cyq.day15.Demo5;

public class Hunter extends Character {
    int Hunterhp;
    int Hunteratk;
    int Hunterdef;

    public Hunter() {
    }

    public Hunter(String name, int level, int gold){
                super.name=name;
                super.level=level;
                super.gold=gold;
    }

    @Override
    public void show() {
        super.show();
        Hunterhp=level*12;
        Hunterdef=level*2;
        Hunteratk=level*2;
        System.out.println("血量为:"+Hunterhp+"攻击力为"+Hunteratk+"防御力为"+Hunterdef);
    }

    public void hunting(){
        System.out.println(super.name+"使用猎人技能打猎");
        gold+=10;
        Hunterhp-=8;
        super.show();
        System.out.println("血量为:"+Hunterhp+"攻击力为"+Hunteratk+"防御力为"+Hunterdef);
    }

}
